#include<queue>
#include<iostream>
#include<vector>
using namespace std;
using ll=long long;
//优先队列
struct Compare
{
    bool operator()(int a,int b)
    {
        return a<b;
    }

};




int main()
{
    ios::sync_with_stdio(0),cin.tie(0),cout.tie(0);
    std::priority_queue<int,std::vector<int>,Compare> pq;
    pq.push(3);
    pq.push(1);
    pq.push(2);
    while(!pq.empty())   
    {
        cout<<pq.top()<<endl;
        pq.pop();
    } 
    return 0;
}